<% @stylesheets = ["managingTable"]
   @title = "Gestione pizzerie" %>
<table class="managingTable">
  <caption>Pizzerie presenti nel sistema</caption>
  <tr>
    <th>Nome</th>
    <th>Telefono</th>
    <th>Indirizzo</th>
    <th>&nbsp;</th>
  </tr>

<% @restaurants.each do |restaurant| %>
  <tr>
    <td><%= restaurant.name %></td>
    <td><%= restaurant.phonenumber %></td>
    <td><%= restaurant.address %></td>
    <td>
      <%= link_to 'Edit', edit_admin_restaurant_path(restaurant) %>
      <%= link_to 'Destroy', admin_restaurant_path(restaurant), :confirm => 'Are you sure?', :method => :delete %>
    </td>
  </tr>
<% end %>
</table>

<%= link_to 'New restaurant', new_admin_restaurant_path %>
